home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #1 / Ham Radio 2000.iso / ham2000 / tcp_ip / tnos / tnos100s / dmsmgr.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1992-09-06  |  1006 b   |  44 lines

  1. #if !defined(DMSMGR)
  2. #define DMSMGR
  3.  
  4. #if !defined(VMSMGR)
  5. #include <iostream.h>
  6. #include <iomanip.h>
  7. #include <stdlib.h>
  8. #include <stdio.h>
  9. #include <dos.h>
  10. #include <string.h>
  11. #include <alloc.h>
  12. #endif
  13.  
  14. typedef int Boolean;
  15. #define FALSE    0
  16. #define TRUE    1
  17.  
  18. class dmsmgr    {
  19.     FILE *fp;
  20.     Boolean installed;
  21.     unsigned char errcode;
  22. protected:
  23.     unsigned long thesize;
  24.     unsigned long numelements;
  25. public:
  26.     dmsmgr(unsigned long the_size, unsigned long num_elements = 1);
  27.     ~dmsmgr();
  28.     void alloc_dmb();
  29.     inline operator void*() { return (void *)installed; }
  30.     inline int operator!() { return !installed; }
  31.     inline int is_installed() { return installed; }
  32.     inline unsigned char readerr() { return errcode; }
  33.     inline void clearerr() { errcode = 0; }
  34.     char* dmserr();
  35.     unsigned long size() { return thesize; }
  36.     unsigned long elements() { return numelements; }
  37.     Boolean stow( char far* send, size_t listnum );
  38.     Boolean fetch( char far* receive, size_t listnum );
  39. };
  40.  
  41. #endif
  42.  
  43.     
  44.